package com.wp.text;

import com.wp.service.AccountService;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author 卫鹏
 * @Description
 * @createTime 2021年10月19日 15:46:00
 */
public class SpringTest {

    @Test
    public void test1() {
        //加载配置文件:
        ApplicationContext ac = new ClassPathXmlApplicationContext("classpath:applicationContext.xml");
        //获取对象:
        AccountService as = ac.getBean("accountServiceImpl", AccountService.class);
        //调用方法:
        as.findAll();
    }
}
